<?php
include_once("./_common.php");

//
$string = "qstr_id = '$qstr_id',
	qstr_nm = '$qstr_nm',
	q_title = '$q_title',
	q_content = '$q_content',
	q_date = '$q_date',
	rplr_nm = '$rplr_nm',
	r_content = '$r_content',
	r_date = '$r_date'";


if ($w == "")
{
	$sql = "INSERT
			  INTO QNA_record
			   SET $string";
	$rst = sql_query($sql);
}
else if ($w == "u")
{
	$sql = "UPDATE QNA_record
			   SET $string
			 WHERE id = '$id'";
	$rst = sql_query($sql);	
}
else if ($w == "d")
{
	$sql = "DELETE
			FROM	QNA_record
			WHERE	id = '$id'";
	$rst = sql_query($sql);
}

echo("success");

?>
